{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% import "_macros.html" as macros %}
{% block title %}ITAM - 查询资产{% endblock %}
{% block content %}
<div class="center-block" style="width:80%">
<table class="table">
  <thead>
    <tr>
        <th>ID</th>
        <th>编号</th>
        <th>花名</th>
        <th>状态</th>
        <th>CPU</th>
        <th>内存</th>
        <th>硬盘</th>
        <th>显示</th>
        <th>备注</th>
        <th>创建时间</th>
        <th>更新时间</th>
        <th>管理</th>
    </tr>
    </thead>
    <tbody>
{% for i in asset %}
    <tr>
    <td>{{ i.asset_id }}</td>
    <td><a href="/record/{{ i.asset_id }}">{{ i.number }}</a></td>
    <td>{{ i.name }}</td>
    <td>{% if i.asset_state == 1 %}
            在用
        {% elif i.asset_state == 0 %}
            仓库
        {% else %}
            报废
        {% endif %}
    </td>
    <td>{{ i.cpu }}</td>
    <td>{{ i.memory }}</td>
    <td>{{ i.disk }}</td>
    <td>{{ i.display }}</td>
    <td>{{ i.notes }}</td>
    <td>{{ i.asset_ctime }}</td>
    <td>{{ i.asset_utime }}</td>
    <td><a href="/editor/asset?id={{ i.asset_id }}">更新</a><br/>
    </tr>
{% endfor %}
    </tbody>
  </table>
  {% if pagination %}
  <div class="pagination center-block" style="width:80%">
      {{ macros.pagination_widget(pagination, 'select',search = 'asset') }}
  </div>
  {% endif %}
</div>
{% endblock %}
